Optimal. Leaf size=95 \[ \frac{a \sin (c+d x)}{d^2}-\frac{a x \cos (c+d x)}{d}+\frac{4 b x^3 \sin (c+d x)}{d^2}+\frac{12 b x^2 \cos (c+d x)}{d^3}-\frac{24 b x \sin (c+d x)}{d^4}-\frac{24 b \cos (c+d x)}{d^5}-\frac{b x^4 \cos (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.131977, antiderivative size = 95, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 4, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.267, Rules used = {3339, 3296, 2637, 2638} \[ \frac{a \sin (c+d x)}{d^2}-\frac{a x \cos (c+d x)}{d}+\frac{4 b x^3 \sin (c+d x)}{d^2}+\frac{12 b x^2 \cos (c+d x)}{d^3}-\frac{24 b x \sin (c+d x)}{d^4}-\frac{24 b \cos (c+d x)}{d^5}-\frac{b x^4 \cos (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3339
Rule 3296
Rule 2637
Rule 2638
Rubi steps
\begin{align*} \int x \left (a+b x^3\right ) \sin (c+d x) \, dx &=\int \left (a x \sin (c+d x)+b x^4 \sin (c+d x)\right ) \, dx\\ &=a \int x \sin (c+d x) \, dx+b \int x^4 \sin (c+d x) \, dx\\ &=-\frac{a x \cos (c+d x)}{d}-\frac{b x^4 \cos (c+d x)}{d}+\frac{a \int \cos (c+d x) \, dx}{d}+\frac{(4 b) \int x^3 \cos (c+d x) \, dx}{d}\\ &=-\frac{a x \cos (c+d x)}{d}-\frac{b x^4 \cos (c+d x)}{d}+\frac{a \sin (c+d x)}{d^2}+\frac{4 b x^3 \sin (c+d x)}{d^2}-\frac{(12 b) \int x^2 \sin (c+d x) \, dx}{d^2}\\ &=-\frac{a x \cos (c+d x)}{d}+\frac{12 b x^2 \cos (c+d x)}{d^3}-\frac{b x^4 \cos (c+d x)}{d}+\frac{a \sin (c+d x)}{d^2}+\frac{4 b x^3 \sin (c+d x)}{d^2}-\frac{(24 b) \int x \cos (c+d x) \, dx}{d^3}\\ &=-\frac{a x \cos (c+d x)}{d}+\frac{12 b x^2 \cos (c+d x)}{d^3}-\frac{b x^4 \cos (c+d x)}{d}+\frac{a \sin (c+d x)}{d^2}-\frac{24 b x \sin (c+d x)}{d^4}+\frac{4 b x^3 \sin (c+d x)}{d^2}+\frac{(24 b) \int \sin (c+d x) \, dx}{d^4}\\ &=-\frac{24 b \cos (c+d x)}{d^5}-\frac{a x \cos (c+d x)}{d}+\frac{12 b x^2 \cos (c+d x)}{d^3}-\frac{b x^4 \cos (c+d x)}{d}+\frac{a \sin (c+d x)}{d^2}-\frac{24 b x \sin (c+d x)}{d^4}+\frac{4 b x^3 \sin (c+d x)}{d^2}\\ \end{align*}
Mathematica [A] time = 0.133544, size = 66, normalized size = 0.69 \[ \frac{d \left (a d^2+4 b x \left (d^2 x^2-6\right )\right ) \sin (c+d x)-\left (a d^4 x+b \left (d^4 x^4-12 d^2 x^2+24\right )\right ) \cos (c+d x)}{d^5} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.005, size = 258, normalized size = 2.7 \begin{align*}{\frac{1}{{d}^{2}} \left ({\frac{b \left ( - \left ( dx+c \right ) ^{4}\cos \left ( dx+c \right ) +4\, \left ( dx+c \right ) ^{3}\sin \left ( dx+c \right ) +12\, \left ( dx+c \right ) ^{2}\cos \left ( dx+c \right ) -24\,\cos \left ( dx+c \right ) -24\, \left ( dx+c \right ) \sin \left ( dx+c \right ) \right ) }{{d}^{3}}}-4\,{\frac{cb \left ( - \left ( dx+c \right ) ^{3}\cos \left ( dx+c \right ) +3\, \left ( dx+c \right ) ^{2}\sin \left ( dx+c \right ) -6\,\sin \left ( dx+c \right ) +6\, \left ( dx+c \right ) \cos \left ( dx+c \right ) \right ) }{{d}^{3}}}+6\,{\frac{{c}^{2}b \left ( - \left ( dx+c \right ) ^{2}\cos \left ( dx+c \right ) +2\,\cos \left ( dx+c \right ) +2\, \left ( dx+c \right ) \sin \left ( dx+c \right ) \right ) }{{d}^{3}}}+a \left ( \sin \left ( dx+c \right ) - \left ( dx+c \right ) \cos \left ( dx+c \right ) \right ) -4\,{\frac{{c}^{3}b \left ( \sin \left ( dx+c \right ) - \left ( dx+c \right ) \cos \left ( dx+c \right ) \right ) }{{d}^{3}}}+ac\cos \left ( dx+c \right ) -{\frac{b{c}^{4}\cos \left ( dx+c \right ) }{{d}^{3}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.0104, size = 302, normalized size = 3.18 \begin{align*} \frac{a c \cos \left (d x + c\right ) - \frac{b c^{4} \cos \left (d x + c\right )}{d^{3}} -{\left ({\left (d x + c\right )} \cos \left (d x + c\right ) - \sin \left (d x + c\right )\right )} a + \frac{4 \,{\left ({\left (d x + c\right )} \cos \left (d x + c\right ) - \sin \left (d x + c\right )\right )} b c^{3}}{d^{3}} - \frac{6 \,{\left ({\left ({\left (d x + c\right )}^{2} - 2\right )} \cos \left (d x + c\right ) - 2 \,{\left (d x + c\right )} \sin \left (d x + c\right )\right )} b c^{2}}{d^{3}} + \frac{4 \,{\left ({\left ({\left (d x + c\right )}^{3} - 6 \, d x - 6 \, c\right )} \cos \left (d x + c\right ) - 3 \,{\left ({\left (d x + c\right )}^{2} - 2\right )} \sin \left (d x + c\right )\right )} b c}{d^{3}} - \frac{{\left ({\left ({\left (d x + c\right )}^{4} - 12 \,{\left (d x + c\right )}^{2} + 24\right )} \cos \left (d x + c\right ) - 4 \,{\left ({\left (d x + c\right )}^{3} - 6 \, d x - 6 \, c\right )} \sin \left (d x + c\right )\right )} b}{d^{3}}}{d^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.73226, size = 153, normalized size = 1.61 \begin{align*} -\frac{{\left (b d^{4} x^{4} + a d^{4} x - 12 \, b d^{2} x^{2} + 24 \, b\right )} \cos \left (d x + c\right ) -{\left (4 \, b d^{3} x^{3} + a d^{3} - 24 \, b d x\right )} \sin \left (d x + c\right )}{d^{5}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 2.19925, size = 116, normalized size = 1.22 \begin{align*} \begin{cases} - \frac{a x \cos{\left (c + d x \right )}}{d} + \frac{a \sin{\left (c + d x \right )}}{d^{2}} - \frac{b x^{4} \cos{\left (c + d x \right )}}{d} + \frac{4 b x^{3} \sin{\left (c + d x \right )}}{d^{2}} + \frac{12 b x^{2} \cos{\left (c + d x \right )}}{d^{3}} - \frac{24 b x \sin{\left (c + d x \right )}}{d^{4}} - \frac{24 b \cos{\left (c + d x \right )}}{d^{5}} & \text{for}\: d \neq 0 \\\left (\frac{a x^{2}}{2} + \frac{b x^{5}}{5}\right ) \sin{\left (c \right )} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.10582, size = 93, normalized size = 0.98 \begin{align*} -\frac{{\left (b d^{4} x^{4} + a d^{4} x - 12 \, b d^{2} x^{2} + 24 \, b\right )} \cos \left (d x + c\right )}{d^{5}} + \frac{{\left (4 \, b d^{3} x^{3} + a d^{3} - 24 \, b d x\right )} \sin \left (d x + c\right )}{d^{5}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]